<?php
if(isset($_GET['id']))
{
	require_once "php/page/_page-detail.php";
	return;
}
?>

<div class='sub_header'>Dịch vụ</div>

<div class='s_block' id='left'>
<?php
$table=Db::mysql_query(" SELECT * FROM tbl_page WHERE page_group_id=4 AND page_status=1 ORDER BY page_id DESC",FETCH_MODE_TABLE); 
for ($i=0;$i<ceil(count($table)/2);$i++)
{
	$row=$table[$i];
	$link="index.php?page=dich-vu&alias=".$row['page_alias']."&id=".$row['page_id'];
	?>
	<div class='x_block'>
		<a href='<?php echo $link?>' class='image'><img class='i-update' link='page=_page-delete&id=<?php echo $row['page_id'];?>' confirm='1' popup='0' label='Xóa tin' src='<?php echo Common::get_thumb_path($row['page_image']);?>'/></a>
		<a href='<?php echo $link?>' class='title'><?php echo $row['page_title']?></a>
		<div class='content' >
			<span class='i-update' link='page=_page-update&id=<?php echo $row['page_id'];?>'><?php echo $row['page_quote']?></span>
			<a href='<?php echo $link?>' class='read_more title'>Xem chi tiết</a>
		</div>		
		<div class='clear'></div> 
	</div>
	<?php 
	}
?>	
</div>

<div class='s_block' id='left'  style="clear: none;margin-right: 0px;border-right: 0 none;padding-right:0px">
<?php 
for ($i=ceil(count($table)/2);$i<count($table);$i++)
{
	$row=$table[$i];
	$link="index.php?page=dich-vu&alias=".$row['page_alias']."&id=".$row['page_id'];
	?>
	<div class='x_block'>
		<a href='<?php echo $link?>' class='image'><img class='i-update' link='page=_page-delete&id=<?php echo $row['page_id'];?>' confirm='1' popup='0' label='Xóa tin' src='<?php echo Common::get_thumb_path($row['page_image']);?>'/></a>
		<a href='<?php echo $link?>' class='title'><?php echo $row['page_title']?></a>
		<div class='content' >
			<span class='i-update' link='page=_page-update&id=<?php echo $row['page_id'];?>'><?php echo $row['page_quote']?></span>
			<a href='<?php echo $link?>' class='read_more title'>Xem chi tiết</a>
		</div>		
		<div class='clear'></div> 
	</div>
	<?php 
	}
?>	
</div>


